package com.ming.springcloud.user.service;

import com.ming.springcloud.user.dao.IUserDAO;
import com.ming.springcloud.user.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("userService")
public class UserServiceImpl implements IUserService{

    @Resource
    @Autowired
    private IUserDAO userDao;

    @Override
    public boolean findServerByNameLike(String userAccount, String userPassword) {
        boolean isT = false;
        List<User> userList= userDao.findByuserAccountAndUserPassword(userAccount,userPassword);
        if (!userList.isEmpty()){
            isT = true;
        }
        return isT;
    }
}
